<!DOCTYPE html>
<html lang="zh-CN" class="desktop landscape">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">@charset "UTF-8";
    [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide {
        display: none !important;
    }

    ng\:form {
        display: block;
    }

    .ng-animate-block-transitions {
        transition: 0s all !important;
        -webkit-transition: 0s all !important;
    }</style>
    <meta charset="UTF-8">
    <title>共喜财富-应用平台</title>

    <link type="text/css" rel="stylesheet" href="/static/css/splash.min.css">
    <link type="text/css" rel="stylesheet" href="/static/css/yestrap.c4a0c177.css">
    <link type="text/css" rel="stylesheet" href="/static/css/main.fb653491.css">
    <link type="text/css" rel="stylesheet" href="/static/css/imgareaselect-default.css">

    <link type="text/css" rel="stylesheet" href="/static/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="/static/style.ccde8427.css">
    <script type="text/javascript" src="{{ static('js/jquery-1.7.2.min.js') }}"></script>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="shortcut icon" href="https://app.wmcloud.com/cloud-portal/img/common/favicon.ico" type="image/x-icon">
</head>
<body class=" splashing"><!-- uiView:  -->
<div ui-view="" class="splashing_inner ng-scope">
    <div class="head ng-scope"></div>

    <div class="global-bar2 clearfix regist-bar ng-scope">
        <div class="container">
            <div class="logo">
                <a ng-href="/#/main" href="/#/main"><img
                        src="/static/images/logo.png"></a>
            </div>
            <div class="global-nav"></div>
            <div class="pull-right">
                <!-- ngIf: regitState !== 'application.passport' -->
                <a class="btn-login btn ng-scope"
                   ng-href="/login.html"
                   ng-if="regitState !== &#39;application.passport&#39;"
                   href="/login">登录</a><!-- end ngIf: regitState !== 'application.passport' -->
                <!-- ngIf: regitState === 'application.passport' -->
                <!-- ngIf: regitState !== 'application.start' && regitState !== 'application.passport' -->
                <div class="profile nlogin"></div>
            </div>
        </div>
    </div>

    <!-- uiView:  -->
    <div ui-view="" class="ng-scope"><!-- ngIf: !pageState -->
        <div class="regist-start ng-scope" ng-if="!pageState">
            <form class="form-horizontal ng-invalid ng-invalid-required ng-dirty" role="form" name="registerForm" id="registerForm" method="post">
                {{ form.csrf_token }}
                <div class="form-group">
                    <div class="row">
                        <div class="col-sm-2">
                        </div>
                        <div class="col-sm-8">
                            <h3 style="text-align: center">欢迎您加入共喜财富！</h3>
                        </div>
                        <div class="col-sm-2">
                        </div>
                    </div>
                </div>

                <!-- ngIf: !personal -->
                <!-- ngIf: personal && showPhoneRgt -->
                <div ng-if="personal &amp;&amp; showPhoneRgt" class="ng-scope">

                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label float-left">
                                <font class="muted">*</font>用户名：</label>

                            <div class="col-sm-4">
                                <input type="text"
                                       class="form-control s_input input ng-valid-pattern ng-dirty ng-valid ng-valid-required"
                                       ng-model="phoneOptions.username" name="name" id="name"
                                       ng-pattern="/^[a-zA-Z][a-zA-Z0-9\.]{2,28}[a-zA-Z0-9]$/"
                                       placeholder="字母开头,支持数字、点(.)(长度4-30)" maxlength="30" required="">
                            </div>
                            <!-- ngIf: !phoneOptions.username && !registerForm.pUsername.$error.required -->
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label float-left">
                                <font class="muted">*</font>密码：</label>

                            <div class="col-sm-4">
                                <input type="password"
                                       class="form-control s_input input ng-valid-pattern ng-dirty ng-valid ng-valid-required"
                                       name="password" id="password" ng-model="phoneOptions.password" ng-pattern="/^[\S]{6,20}$/"
                                       placeholder="字母、数字、符号(长度6-20)" maxlength="20" minlength="6" required="">
                            </div>
                            <!-- ngIf: !phoneOptions.password && !registerForm.pPassword.$error.required -->
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label float-left"><font class="muted">*</font>图片验证码：</label>

                            <div class="col-sm-4 code_img">
                                <input type="text"
                                       class="form-control s_input input ng-pristine ng-valid-pattern ng-invalid ng-invalid-required"
                                       name="captcha" ng-model="phoneOptions.captcha" maxlength="6"
                                       ng-pattern="/^[a-zA-Z0-9]{6}$/" focus-if="focusInput" required="">
                                <img src="/verifyCode" id="imgcode">
                            </div>
                            <div class="col-sm-2 code_word">
                                <span class="chg-code" onclick="refreshCode()">看不清？</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label float-left">
                                <font class="muted">*</font>手机号码：</label>

                            <div class="code_mobile float-left">
                                <div class="col-sm-2 code_tel">
                                    <input type="text"
                                           class="form-control s_input input ng-pristine ng-valid-pattern ng-invalid ng-invalid-required"
                                           ng-model="phoneOptions.mobile" name="mobile" id="mobile"
                                           ng-pattern="/^(\+86)?(145|147|1[3|5|7|8][0-9])\d{8}$/" placeholder="(+86)"
                                           maxlength="14" required="">
                                </div>
                                <div class="col-sm-2 btn_link">
                                    {# disabled #}
                                    <div class="btn btn-primary btn-lg col-sm-12" id="get_msg_code">
                                        获取验证码<!-- ngIf: timer > 0 --></div>
                                </div>
                            </div>
                            <!-- ngIf: !phoneOptions.mobile && !registerForm.pMobile.$error.required -->
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label float-left">
                                <font class="muted">*</font>手机验证码：</label>

                            <div class="col-sm-4">
                                <input type="text"
                                       class="form-control s_input input ng-pristine ng-valid-pattern ng-invalid ng-invalid-required"
                                       name="code" id="code" ng-model="phoneOptions.code" placeholder="数字(长度6)" maxlength="6"
                                       ng-pattern="/^[\d]{6}$/" required="">
                            </div>
                            <!-- ngIf: !phoneOptions.code && !registerForm.pCode.$error.required -->
                        </div>
                    </div>

                    {#                    <div class="form-group">#}
                    {#                        <div class="row">#}
                    {#                            <label class="col-sm-4 control-label"></label>#}
                    {##}
                    {#                            <div class="col-sm-4">#}
                    {#                                <span class="chkbox"  id="myProtocol" onclick="switchProtocol()"></span>#}
                    {#                                <small>我已阅读并接受 <a  target="_blank" style="text-decoration: none;color: #ffcb2f;"#}
                    {#                                                  href="/protocol">《共喜财富用户协议》</a></small>#}
                    {#                            </div>#}
                    {#                        </div>#}
                    {#                    </div>#}
                    <div class="form-group">
                        <div class="row">
                            <label class="col-sm-4 control-label"></label>

                            <div class="col-sm-4">
                                <button class="btn btn-primary btn-lg col-sm-12 submit" id="submit">注册
                                </button>
                            </div>
                        </div>
                    </div>

                    {#                    <div class="form-group tr">#}
                    {#                        <div class="row">#}
                    {#                            <label class="col-sm-4 control-label"></label>#}
                    {##}
                    {#                            <div class="col-sm-4 control-label fr">#}
                    {#                                <a href="" class="col-sm-4" ng-click="switchPhoneAndEmail()">邮箱注册</a>#}
                    {#                            </div>#}
                    {#                        </div>#}
                    {#                    </div>#}
                        </form>
                </div>
                <!-- end ngIf: personal && showPhoneRgt -->
                <!-- ngIf: personal && !showPhoneRgt -->
            </form>
        </div>
        <!-- end ngIf: !pageState -->
        <!-- ngIf: pageState -->
    </div>
    <div class="footer ng-scope">
        <div class="footer-bottom">
            <footer class="global-footer">

                <div class="copyright">
                    <div class="container">
                        <p>
                            <span>© 2015 <a href="/" target="_blank">DataYes</a></span>
                            <a class="icp" href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备13045831号</a>
                            <span>咨询热线：4000 820 386</span>

                            <a href="/#/protocol" target="_blank" class="agreement">用户协议</a>
                        </p>
                    </div>
                </div>
            </footer>
        </div>
    </div>
</div>
<script type="text/javascript">
    function switchProtocol() {
        $("#myProtocol").toggleClass("checked")
    }
    function refreshCode() {
        document.getElementById("imgcode").src = "/verifyCode/" + Math.random();
    }

    //发送验证码
    var wait;
    var data=[];
    $("#get_msg_code").click(function () {
        wait = 60;
        var mobile_number = $("#mobile").val();
        var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
        if (!myreg.test(mobile_number)) {
            alert ("手机号码格式不正确");
            $("#phone").focus();
            return false;
        }
        else {
            $(this).addClass("disabled").text("等待" + wait + "秒");
            time($(this));
            $.ajax({
                type: 'get',
                url: '/sendcode?mobile='+mobile_number,
                data: data,
                success: function (data) {
                }
            });
        }
    });
    function time(o) {
        if (wait == 0) {
            o.removeAttr("disabled");
            wait = 60;
            o.text("重新获取");

        } else {
            o.attr("href", "javascript:void(0)");
            o.text("等待" + wait + "秒");
            wait--;
            setTimeout(function () {
                        time(o)
                    },
                    1000)
        }
    }
    $("#submit").click(function(){
        var name_reg="/^[a-zA-Z][a-zA-Z0-9\.]{2,28}[a-zA-Z0-9]$/";
         var username=$("#name").val();
        var password=$("#password").val();
        var code=$("#code").val();
        if (!name_reg.test(username)) {
            alert ("用户名格式不正确")
            $("#submit").addClass("disabled");
            return false
        }
        else if (password==""){
            $("#submit").addClass("disabled")
            alert ("请输入密码")
            return false
        }
        if (code==''){
            $("#submit").addClass("disabled")
            alert ("请输入手机验证码")
            return false
        }
        $("#submit").removeClass("disabled")
        $("#registerForm").submit()
    })
</script>
<div global-footer="" class="ng-isolate-scope"></div>
</body>
</html>